package com.nbjtjc.safe.mapper.emg;

import com.nbjtjc.safe.model.emg.EmgPlan;
import com.nbjtjc.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmgPlanMapper extends MyMapper<EmgPlan> {

    List<EmgPlan> search(@Param("emgPlan") EmgPlan emgPlan);

    @ResultMap("planGoods")
    @Select("select * from emg_plan where emg_plan.type_id=#{typeId}")
    List<EmgPlan> findByTypeId(@Param("typeId") int typeId);
}